package com.admin.themechange

import android.support.v7.app.AppCompatDelegate
import android.util.TypedValue
import kotlinx.android.synthetic.main.activity_setting.*

/**
 * author 吴昶
 * date 2019/5/29
 * 标注
 */
class SettingActivity :BaseActivity(){
    override fun bindLayout(): Int {
        return R.layout.activity_setting
    }

    override fun bindEvent() {
        tv_bg_day.setOnClickListener {
//            SkinCompatManager.getInstance().restoreDefaultTheme()
            AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
//            SharedPreferencesUntil.saveValue("style",0)
//            setStyle()
            finish()
        }

        tv_bg_night.setOnClickListener {
//            SkinCompatManager.getInstance().loadSkin("night",null,SkinCompatManager.SKIN_LOADER_STRATEGY_BUILD_IN)
            AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
//            SharedPreferencesUntil.saveValue("style",1)
//            setStyle()
            finish()
        }
    }



}